package com.headhunter.server;

import java.rmi.*;

/**
 * Class that binds the Headhunter implementation to the rmi registry and starts
 * the server
 * 
 * @author gokhan
 * 
 */
public class HeadhunterAppServer {

	public static void main(String[] args) {
		System.setSecurityManager(new RMISecurityManager());
		try {
			Headhunter headhunter = new HeadhunterImpl();
			String url = "rmi://localhost:1099/Headhunter";
			Naming.rebind(url, headhunter);
			System.out.println("Starting Headhunter server");
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
